<?php defined('SYSPATH') or die('No direct script access.');
class User_Model extends Model {

	/**
	  * Parent constructor - creates the db object
	  */
	public function __construct()
	{
		// load database library into $this->db (can be omitted if not required)
		parent::__construct();
	}
 
	/**
	 * Get information about a user, given their id
	 * @param integer the id
	 * @return a userdata hash (single row from users table)
	 */
	public function get_user($user_id)
	{
		$result = $this->db->from('users')->where('id', $user_id)->get();
		return $result->current();
	}
}